#ifndef __CLIENT_VERTEXBUFFER__
#define __CLIENT_VERTEXBUFFER__

#include "game_client.h"

class ClientVertexBuffer9 {
private:
	IDirect3DVertexBuffer9* m_vb;
	
	int length;
	bool isFirst;
	char * vb_data;

	short stride;
	short streamNumber, offsetInBytes;
	UCHAR cp_off, ct_off, ctt_of, cn_off, ctt_size;
	float cMaxX, cMaxY, cMaxZ; // bound box

public:
	void UpdateVertexBuffer();
	BufferLockData m_LockData;
	ClientVertexBuffer9(IDirect3DVertexBuffer9* ptr, int _length);
	HRESULT Lock(UINT OffestToLock, UINT SizeToLock, DWORD Flags);
	HRESULT Unlock();

	IDirect3DVertexBuffer9* GetVB();
	int GetLength();

	HRESULT s_Unlock();
	void s_UpdateVertexBuffer();
};

#endif
